﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    /// <summary>
    /// 职工信息表
    /// </summary>
    public class Employee
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }

        /// <summary>
        /// 职位
        /// </summary>
        [Required]
        public Position Postion { get; set; }

        public enum Position
        {
            领导=0,
            党务人员=1,
            雇员=2
        }

        /// <summary>
        /// 薪资
        /// </summary>
        [Required]
        public float Salary { get; set; }

        /// <summary>
        /// 参加工作日期
        /// </summary>
        [Required]
        public DateTime WorkingDate { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        [Required]
        public DateTime AddTime { get; set; }

        /// <summary>
        /// 是否购买保险
        /// </summary>
        [Required]
        public bool Insurance { get; set; }

        /// <summary>
        /// 请假天数
        /// </summary>
        [Required]
        public int Leave_days { get; set; }
    }
}
